build_site() {
    local file_type=${1:?}
    local website_root_dir=${2:?}
    local relative_path_to_template=${3:?}
    local relative_path_to_filter=${4:?}
    local theme=${5:-}
    local alt_theme_path=${6:-}
    local relative_output_dir=${7:-"output"}


    local working_dir=
    working_dir=$(pwd)
    local website_template=
    website_template=$(get_absolute_path "$working_dir" "$relative_path_to_template")
    local filter=
    filter=$(get_absolute_path "$working_dir" "$relative_path_to_filter")
    local output_dir=
    output_dir=$(get_absolute_path "$working_dir" "$relative_output_dir")
    local git_branch=
    git_branch=$(get_git_branch)
    local git_commit_id=
    git_commit_id=$(get_git_commit_id)
    local git_commit_id_short=
    git_commit_id_short=$(get_git_commit_id_short)
    local date_stamp=
    date_stamp=$(get_date_stamp)


    cd "${website_root_dir}" || {
        echo "ERROR: Could not cd"
        exit 1
    }
    local array=()
    while IFS=  read -r -d $'\0'; do
        array+=("$REPLY")
    done < <(find . -type f -not -path "./drafts/*" -print0)
    for current_file in "${array[@]}"
    do
        process_file \
            "$file_type" \
            "$current_file" \
            "$website_template" \
            "$filter" \
            "$theme" \
            "$alt_theme_path" \
            "$output_dir" \
            "$git_branch" \
            "$git_commit_id" \
            "$git_commit_id_short" \
            "$date_stamp"
    done
}
